package com.atxiaodei.alibabaseata.service.impl;

import com.atxiaodei.alibabaseata.dao.StorageDao;
import com.atxiaodei.alibabaseata.service.StorageService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @ClassName StorageServiceImpl
 * @Deacription TODO
 * @Author 王盟
 * @Date 2021/3/1 10:22
 * @Version 1.0
 **/
@Service
@Slf4j
public class StorageServiceImpl implements StorageService {


    @Resource
    private StorageDao storageDao;

    @Override
    public void decrease(Long productId, Integer counts) {
        log.info("----> storage-service中扣减库存开始");
        storageDao.decrease(productId,counts);
        log.info("----> storage-service中扣减库存结束");
    }
}
